<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			div{
				height: 100px;
				width: 100px;
			}
			div:first-child{
				background-color: yellow;
				position: absolute;/*设置此属性，会让出空间，脱离文档流*/
				z-index: 2;/*将黄色盒子防在蓝色盒子之上*/
			}
			div:nth-child(2){
				background-color:blue;
				position: fixed;/*不设置特殊定位，偏移量top、left无效*/
				left:50px;
				top:50px;/*距离左边，上边的*/
				z-index: 1;/*在z轴上移动
			}
		</style>
	</head>
	<body>
		<div></div>
		<div></div>
	</body>
</html>
